export function Format(str){
  console.log(str)
  var year = str.getFullYear();
  var month = (str.getMonth() + 1).toString();
  var day = (str.getDate()).toString();
  var hour = (str.getHours()).toString();
  var minute = (str.getMinutes()).toString();
  var second = (str.getSeconds()).toString();
  if(month.length == 1){
    month = "0" + month;
  }
  if(day.length == 1){
    day = "0" + day;
  }
  if(hour.length == 1){
    hour = "0" + hour;
  }
  if(minute.length == 1){
    minute = "0" + minute;
  }
  if(second.length == 1){
    second = "0" + second;
  }
  var dateTime = year + '-' + month + '-' + day + " " + hour + ":" + minute + ":" + second
  return dateTime
}

